package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * 题目种类枚举
 */
@Getter
public enum SubjectInfoTyperEnum {

    RADIO(1,"单选"),

    MULTIPLE(2,"多选"),

    JUDGE(3,"判断"),

    BRIEF(4,"简单");

    public int code;

    public String desc;

    SubjectInfoTyperEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static SubjectInfoTyperEnum getByCode(int codeVal){
        for (SubjectInfoTyperEnum resultCodeEnum: SubjectInfoTyperEnum.values()){
            if (resultCodeEnum.code==codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
